import {createRouter, createWebHashHistory} from 'vue-router'
import Home from '@/views/Home.vue'

const Tags = () => import(/*webpackChunkName: "views"*/ '../views/Tags.vue')
const Dashboard = () => import(/*webpackChunkName: "views"*/ '../views/Dashboard.vue')
const DetailList = () => import(/*webpackChunkName: "views"*/ '../views/DetailList.vue')
const Detail = () => import(/*webpackChunkName: "views"*/ '../views/Detail.vue')

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            name: 'home',
            component: Home,
            meta: {
                index: 1
            },
            children: [
                {path: '/tags', name: 'tags', component: Tags},
                {path: '/dashboard', name: 'dashboard', component: Dashboard},
                {path: '/detail_list', name: 'detail_list', component: DetailList},
                {path: '/detail', name: 'detail', component: Detail}
            ]
        }
    ]
})

export default router
